home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / ma22#2.zip / EXAMPLE1.65 < prev    next >
Text File  |  1991-08-21  |  1KB  |  52 lines

  1. *
  2. * Sample source file for the Rockwell 6502
  3. *
  4. * (this program does not do anything, it is only an example)
  5. *
  6.     title   Sample source file
  7. *
  8. * Definitions
  9. *
  10. cr      equ     $0d     ;carriage return
  11. lf      equ     10      ;line feed
  12. RAM:    equ     $2000   ;memory start
  13. ppi0    equ     $8000   ;ppi 0
  14. crppi0  equ     ppi0+1  ;control register
  15. srppi0  equ     ppi0+2  ;status register
  16. flag    equ     123     ;flag bit
  17. offset  set     0
  18. *
  19. * Variables
  20. *
  21.     org     RAM     ;variables
  22. key     reserve 16      ;key buffer
  23. table   reserve 2+3*$10 ;address table
  24. loop1:
  25. offset  set     9
  26. *
  27. * Program
  28. *
  29.     lda     #'*'
  30.     ldx     $44,y
  31.     cmp     (35,x)
  32.     cmp     (22),y
  33.     ora     flag
  34.     lda     $1035
  35.     lda     messg1+offset
  36.     ora     #flag
  37.     ldx     #10
  38.     jsr     delay
  39.     jmp     loop1
  40. *
  41. * Delay routine
  42. *
  43. delay:  dex
  44.     rts
  45. *
  46. * Dummy data
  47. *
  48. routines word $1234,$f800,0 ;routine addresses
  49. messg1  byte    cr,lf,'String no 1.',0
  50. messg2  byte    cr,lf,lf,'Press a key.',0
  51.     end
  52.